#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDebug>

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}


void MainWindow::on_checkBox_3_stateChanged(int arg1)
{
    qDebug() << "点击了 checkBox_3，状态：" << arg1;
}

void MainWindow::on_checkBox_stateChanged(int arg1)
{
    qDebug() << "点击了 checkBox_1，状态：" << arg1;
}

void MainWindow::on_checkBox_2_stateChanged(int arg1)
{
    qDebug() << "点击了 checkBox_2，状态：" << arg1;
}

void MainWindow::on_checkBox_4_stateChanged(int arg1)
{
    qDebug() << "点击了 checkBox_4，状态：" << arg1;
}

void MainWindow::on_checkBox_5_stateChanged(int arg1)
{
    qDebug() << "点击了 checkBox_5，状态：" << arg1;
}

void MainWindow::on_commandLinkButton_clicked()
{
    qDebug() << "百度";
}

void MainWindow::on_pushButton_clicked()
{
    int index = (ui->stackedWidget->currentIndex() -1 )% ui->stackedWidget->count();
    ui->stackedWidget->setCurrentIndex(index);
}


void MainWindow::on_pushButton_2_clicked()
{
    int index = (ui->stackedWidget->currentIndex() +1 )% ui->stackedWidget->count();
    ui->stackedWidget->setCurrentIndex(index);
}



void MainWindow::on_horizontalScrollBar_actionTriggered(int action)
{
    ui->progressBar->setValue(ui->horizontalScrollBar->value());
    qDebug() << ui->horizontalScrollBar->value();
}

void MainWindow::on_dial_actionTriggered(int action)
{
    ui->progressBar->setValue(ui->dial->value());
}

void MainWindow::on_verticalSlider_actionTriggered(int action)
{
    ui->progressBar->setValue(ui->verticalSlider->value());
}

void MainWindow::on_verticalScrollBar_actionTriggered(int action)
{
    ui->progressBar->setValue(ui->verticalScrollBar->value());
}
